package com.cy6;
/*
用来测试可变参数
 */
public class argsDemo {
    public static void main(String[] args) {
        System.out.println(sum(50,60));
    }
    public static int sum(int...a){
        int sum=0;
        for (int i : a) {
            sum+=i;
        }
        return sum;
    }
}
